import { Notify } from "vant";
export default function ({ key, message, limit = 1000 * 60 * 5 }) {
    const timeout =
        limit -
        (new Date().getTime() -
            (parseInt(window.localStorage.getItem(key)) || 0));
    if (timeout > 0) {
        Notify(message instanceof Function ? message(timeout) : message);
        return true;
    }
    return false;
}
